package cn.toleo.search.listener;

import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

/**
 * 接受activemq的消息
 * @author Administrator
 *
 */
public class MyMessageListener implements MessageListener{

	@Override
	public void onMessage(Message message) {
		try{
		//主干基础
		TextMessage textMessage=(TextMessage)message;
		String text = textMessage.getText();
		
		// 结果
		System.out.println(text);
		
		}catch(Exception e){
			e.printStackTrace();
		}
	}
}
